luci-mod-status: add source/gateway display for ipv4/ipv6
authorAndy Chiang <[email protected]>
Fri, 10 Oct 2025 09:58:19 +0000 (16:58 +0700)
committerPaul Donald <[email protected]>
Sat, 11 Oct 2025 19:39:43 +0000 (21:39 +0200)
*add source display for ipv4
*add gateway display for ipv6

Signed-off-by: Andy Chiang <[email protected]>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/routes.js

index f5328d96d8dad3e61c2e66d1cce2015525d27688..59ce7b7cd930a40a998fba6a2a16f42c735e5cc3 100644 (file)
@@ -163,7 +163,8 @@ return view.extend({
                        res.push([
                                E('span', { 'class': 'ifacebadge' }, [ net ? net : '(%s)'.format(flags.dev) ]),
                                dest,
-                               (v6 ? flags.from : flags.via) || '-',
+                               flags.via || '-',
+                               flags.src || flags.from || '-',
                                String(flags.metric || 0),
                                flags.table || 'main',
                                flags.proto,
@@ -222,6 +223,7 @@ return view.extend({
                                E('th', { 'class': 'th', 'title': device_title }, [ _('Device') ]),
                                E('th', { 'class': 'th', 'title': target_title }, [ _('Target') ]),
                                E('th', { 'class': 'th', 'title': gateway_title }, [ _('Gateway') ]),
+                               E('th', { 'class': 'th', 'title': source_title }, [ _('Source') ]),
                                E('th', { 'class': 'th', 'title': metric_title }, [ _('Metric') ]),
                                E('th', { 'class': 'th', 'title': table_title }, [ _('Table') ]),
                                E('th', { 'class': 'th', 'title': proto_title }, [ _('Protocol') ])
@@ -247,6 +249,7 @@ return view.extend({
                        E('tr', { 'class': 'tr table-titles' }, [
                                E('th', { 'class': 'th', 'title': device_title }, [ _('Device') ]),
                                E('th', { 'class': 'th', 'title': target_title }, [ _('Target') ]),
+                               E('th', { 'class': 'th', 'title': gateway_title }, [ _('Gateway') ]),
                                E('th', { 'class': 'th', 'title': source_title }, [ _('Source') ]),
                                E('th', { 'class': 'th', 'title': metric_title }, [ _('Metric') ]),
                                E('th', { 'class': 'th', 'title': table_title }, [ _('Table') ]),